package com.yanqu.road.entity.activity.xiuxian.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_xiuxian_pvp_data")
public class CrossXiuXianPvpData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "锁定状态")
    private boolean lockState;

    @FieldTypeAnnotation(desc = "宗门分配状态")
    private boolean genCampState;

    @FieldTypeAnnotation(desc = "当前轮次")
    private int round;

    @FieldTypeAnnotation(desc = "本轮pvp活动状态 0:未开始,1:准备期,2:进行中,3:已结束")
    private int activityState;

    @FieldTypeAnnotation(desc = "宗门积分")
    private Map<Integer, Map<Integer, CrossXiuXianPvpCampScoreRecord>> campScoreRecordMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "更新时间,检测活动状态")
    private long updateTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public boolean isLockState() {
        return lockState;
    }

    public void setLockState(boolean lockState) {
        if (this.lockState != lockState) {
            this.lockState = lockState;
            setOp(DataStatus.Update);
        }
    }

    public boolean isGenCampState() {
        return genCampState;
    }

    public void setGenCampState(boolean genCampState) {
        if (this.genCampState != genCampState) {
            this.genCampState = genCampState;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public int getActivityState() {
        return activityState;
    }

    public void setActivityState(int activityState) {
        if (this.activityState != activityState) {
            this.activityState = activityState;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Map<Integer, CrossXiuXianPvpCampScoreRecord>> getCampScoreRecordMap() {
        return campScoreRecordMap;
    }

    public void setCampScoreRecordMap(Map<Integer, Map<Integer, CrossXiuXianPvpCampScoreRecord>> campScoreRecordMap) {
        if (campScoreRecordMap == null) {
            return;
        }
        this.campScoreRecordMap = campScoreRecordMap;
        setOp(DataStatus.Update);
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setOp(DataStatus.Update);
        }
    }
}
